Arithmetic Operators in MySQL
Arithmetic operators in MySQL are used to perform mathematical calculations in SQL queries. These operators work on numeric values and return numeric results.
+ (Addition) – Adds two numbers.
- (Subtraction) – Subtracts one number from another.
* (Multiplication) – Multiplies two numbers.
/ (Division) – Divides one number by another; returns a decimal.
DIV (Integer Division) – Returns the integer quotient (discard decimal).
% or MOD (Modulo) – Returns the remainder of a division operation.
These operators are often used in calculations inside SELECT, WHERE, and even UPDATE statements.